package com.bsj.power.pls.service;

import com.bsj.power.common.config.global.JsonResult;
import com.bsj.power.common.constant.AlarmEnum;
import com.bsj.power.common.def.dto.alarmReport.AlarmHandleDTO;
import com.bsj.power.common.def.dto.alarmReport.AlarmReportSearchDTO;
import com.bsj.power.common.def.vo.pls.AlarmReportCountVO;
import com.bsj.power.common.def.vo.pls.AlarmReportVO;
import com.bsj.power.common.def.vo.pls.alarm.AlarmDurationVO;
import com.bsj.power.common.def.vo.pls.alarm.AlarmTypeVO;
import com.bsj.power.common.def.vo.pls.excel.AlarmReportCountExcelVO;
import com.bsj.power.common.def.vo.pls.excel.AlarmReportExcelVO;
import com.bsj.power.common.def.vo.pls.excel.ComAlarmExcelVO;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description AlarmReportService
 * @time 2024/4/25 17:29
 */
public interface AlarmReportService {

    /**
     * 报警报表
     *
     * @param alarmReportSearchDTO
     * @return com.bsj.power.common.config.global.JsonResult<java.util.List < com.bsj.power.common.def.vo.pls.AlarmReportCountVO>>
     * @author ljx
     * @time 2024/4/25 17:32
     */
    JsonResult<List<AlarmReportCountVO>> pageAlarmReportCount(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 报警详情
     *
     * @param alarmReportSearchDTO
     * @return com.bsj.power.common.config.global.JsonResult<java.util.List < com.bsj.power.common.def.vo.pls.AlarmReportVO>>
     * @author ljx
     * @time 2024/5/13 10:10
     */
    JsonResult<List<AlarmReportVO>> alarmReportDetail(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 报警区域统计
     *
     * @param startTime
     * @param endTime
     * @return java.util.Map<java.lang.String, java.lang.Long>
     * @author ljx
     * @time 2024/5/13 15:50
     */
    Map<String, Long> alarmAreaCount(String startTime, String endTime) throws ParseException;

    /**
     * 报警次数趋势
     *
     * @param startTime
     * @param endTime
     * @param type      1单位月 2单位日
     * @return java.util.Map<java.lang.String, java.lang.Long>
     * @author ljx
     * @time 2024/5/13 16:24
     */
    Map<String, Long> alarmTimeCount(String startTime, String endTime, Integer type) throws ParseException;

    /**
     * 报警时长趋势
     *
     * @param startTime
     * @param endTime
     * @return
     * @throws ParseException
     */
    List<AlarmDurationVO> alarmDurationCount(String startTime, String endTime) throws ParseException;

    /**
     * 获取导出数据
     *
     * @param alarmReportSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.excel.AlarmReportCountExcelVO>
     * @author ljx
     * @time 2024/5/14 11:53
     */
    List<AlarmReportCountExcelVO> getExportData(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 处理报警
     *
     * @param alarmHandleDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/5/23 16:02
     */
    JsonResult handleAlarm(AlarmHandleDTO alarmHandleDTO);

    /**
     * 获取报警详情导出数据
     *
     * @param alarmReportSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.excel.AlarmReportExcelVO>
     * @author ljx
     * @time 2024/9/5 12:02
     */
    List<AlarmReportExcelVO> getExportDetail(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 组合报警分页
     *
     * @param alarmReportSearchDTO
     * @return com.bsj.power.common.config.global.JsonResult<java.util.List < com.bsj.power.common.def.vo.pls.AlarmReportVO>>
     * @author ljx
     * @time 2024/10/12 9:35
     */
    JsonResult<List<AlarmReportVO>> pageComAlarm(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 获取组合报警导出信息
     *
     * @param alarmReportSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.excel.ComAlarmExcelVO>
     * @author ljx
     * @time 2024/10/12 10:19
     */
    List<ComAlarmExcelVO> getExportComAlarmInfo(AlarmReportSearchDTO alarmReportSearchDTO);

    /**
     * 根据设备号查询未结束的报警类型
     *
     * @param deviceName
     * @return java.util.List<java.lang.Integer>
     * @author ljx
     * @time 2024/10/24 11:29
     */
    List<Integer> getAlarmTypeByDeviceName(String deviceName);

    /**
     * uwb报警列表
     *
     * @param alarmReportSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.AlarmReportVO>
     * @author ljx
     * @time 2024/11/1 10:29
     */
    List<AlarmReportVO> listUwbAlarm(AlarmReportSearchDTO alarmReportSearchDTO);
}
